package com.bafa.objects;

import java.util.Comparator;
import java.util.TreeSet;

import com.bafa.util.comparators.MatchByDateComparator;

public class Knockout{

	private String name;
	private int ID;
	private int round;
	private int seasonId;
	private String cupPlate;
	private TreeSet matches = new TreeSet(new MatchByDateComparator());
	
	
	public Knockout(String name,int ID, int round, int seasonId, String cupPlate){
		this.name=name;
		this.ID=ID;
		this.round=round;
		this.seasonId=seasonId;
		this.cupPlate=cupPlate;
	}
	
	public void addMatch(Match match){
		matches.add(match);
	}

	public Match[] matchArray(){
		return (Match[])matches.toArray(new Match[matches.size()]);
	}
	public int getID() {
		return ID;
	}

	public TreeSet getMatches() {
		return matches;
	}

	public String getName() {
		return name;
	}

	public int getRound() {
		return round;
	}

	public int getSeasonId() {
		return seasonId;
	}

	public String getCupPlate() {
		return cupPlate;
	}
}
